﻿using System.Diagnostics;
namespace ExecuteFFmpegCommand
{
    public partial class Form2 : Form
    {

        public Form2()
        {
            InitializeComponent();

        }
        private void Form2_Load(object sender, EventArgs e)
        {
            LoadProcesses();
        }

        private void LoadProcesses()
        {
            Process[] processes = Process.GetProcesses();

            foreach (Process process in processes)
            {
                comboBox1.Items.Add(Tuple.Create(process.ProcessName, process.Id));
            }
        }

        private void processComboBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            string? selectedProcessName = comboBox1.SelectedItem.ToString();

            if (selectedProcessName == null)
            {


            }

            // 在这里处理所选进程的相关逻辑
            // ...
        }



    }
}
